import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';


//ReactDOM挂载到实例上面 
//ReactDOM的功能就是把react组件卸载或者渲染成真正的dom


//引入路由
//BrowserRouter history模式 
import { BrowserRouter } from "react-router-dom"

//使用react-redux 关联仓库
import { Provider } from "react-redux"

// import store from './store';

// import store from "./store/tollkitIndex"

import store from './store/userinfoindex';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  //严格模式
  // <React.StrictMode>
  <BrowserRouter>
    <Provider store = {store}>
      <App />
    </Provider>

  </BrowserRouter>

  // </React.StrictMode>
);

//卸载例子

// setTimeout(()=>{
//   root.unmount()
// },2000)

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
